﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCSService;

namespace SCS.Core.Models
{
    public class AdvertiesMasterModel
    {
        #region "Adverties"

        //public List<Adverty> GetAdvertiesBy

        public static List<Adverty> GetListAdverties(int? cateID, int LanguagesID, int siteGuid)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            return advSvc.GetListAdverties(LanguagesID, siteGuid, null);
        }
        
        public static List<Adverty> GetListAdvertiesSearch(int LanguagesID, int siteGuid, string AdvertiesName, string AdvertiesUrl, string AdvertiesTarget, int? AdvertiesPromotion, int? AdvertiesType, int? AdvertiesView, string AdvertiesIP, string AdvertiesPageID, bool? AdvertiesActive, int?Sort)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            return advSvc.GetListAdvertiesBySearch(LanguagesID, siteGuid, AdvertiesName, AdvertiesUrl, AdvertiesTarget, AdvertiesPromotion, AdvertiesType, AdvertiesView, AdvertiesIP, AdvertiesPageID, AdvertiesActive, Sort);
        }

        public static Adverty GetAdverties(int id)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            return advSvc.GetAdvertyByID(id);
        }

        public static int CreateAdverties(Adverty adv)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            return advSvc.CreateAdverty(adv);
        }

        public static void UpdateAdverties(Adverty adv)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            advSvc.UpdateAdverties(adv);
        }

        public static void UpdateSortAdverties(int? id, int? newSort)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            advSvc.UpdateSortAdverties(id, newSort);
        }

        public static void DeleteAdverties(int id)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            advSvc.DeleteAdverties(id);
        }

        public static int GetCountAdverties(int LanguagesID, int siteGuid)
        {
            SCSService.AdvertyService advSvc = new AdvertyService();
            return advSvc.GetCountAdverties(LanguagesID, siteGuid);
        }
       

        
        #endregion   
    
    
    }
}
